package com.woniu.order.service;

import com.alipay.api.AlipayApiException;
import com.baomidou.mybatisplus.extension.service.IService;
import com.woniu.order.dto.DownpaymentDto;
import com.woniu.order.model.TDownpayment;

import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author 吴彦祖
 * @since 2024年06月03日
 */
public interface TDownpaymentService extends IService<TDownpayment> {
    /**
     * 判断用户信誉分，发起定金支付
     * @return
     */
    DownpaymentDto payDownpayment(Integer userId) throws Exception;
    /**
     * 支付押金的异步回调
     * @return 返回"SUCCESS"
     */
    String payNotify(Map<String, String> params) throws AlipayApiException;
    /**
     * 退押金
     * @param orderNum 订单编号
     * @return 返回阿里响应结果
     * @throws Exception
     */
    String refund(String orderNum, int userId) throws AlipayApiException;
}
